<template>
  <el-config-provider
    :size="size"
    :locale="language"
  >
    <router-view />
  </el-config-provider>
</template>

<script lang="ts" setup>
import { computed } from 'vue'
import { useAppStore } from './store/app'
import { messages } from '@/locales/index'

const appStore = useAppStore()
const size = computed(() => {
  return appStore.size
})

const language = computed(() => {
  const lang = appStore.language
  return messages[lang]
})
</script>

<style lang="scss" scoped>

</style>
